home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / polyEditFacetProperties.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  4.2 KB  |  129 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. // Copyright (C) 1997-1998 Alias|Wavefront,
  18. // a division of Silicon Graphics Limited.
  19. //
  20. // The information in this file is provided for the exclusive use of the
  21. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  22. // and incorporate this code into other products for purposes authorized
  23. // by the Alias|Wavefront license agreement, without fee.
  24. //
  25. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  26. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  27. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  28. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  29. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  30. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  31. // PERFORMANCE OF THIS SOFTWARE.
  32. //
  33. //
  34. //  Alias|Wavefront Script File
  35. //  MODIFY THIS AT YOUR OWN RISK
  36. //
  37. //  Creation Date:  Thu Aug  7 21:44:35 MDT 1997
  38. //  Author:         marianne
  39. //
  40. //  Description:
  41. //              helps to create the controls for polyCreateFacet,
  42. //              polyAppend and polySplit tools property sheet.
  43. //
  44. //  Input Arguments:
  45. //      None.
  46. //
  47. //  Return Value:
  48. //      None.
  49. //
  50.  
  51. global proc polyEditFacetProperties (string $type, string $ctxCmd)
  52. {
  53.     string $parent = `toolPropertyWindow -q -location`;
  54.     
  55.     setUITemplate -pushTemplate OptionsTemplate;
  56.     setParent $parent;
  57.  
  58.     string $title;
  59.     if ($type == "polyAppend") {
  60.         $title = "Append to Polygon Settings";
  61.     } else if ($type == "polySplit") {
  62.         $title = "Split Polygon Settings";
  63.     } else if ($type == "polyCreateFacet") {
  64.         $title = "Create Polygon Settings";
  65.     }
  66.  
  67.     columnLayout -adj true $type; 
  68.         frameLayout -collapsable true -collapse false -l $title
  69.             propFrame;
  70.             columnLayout propLayout;
  71.                 // Subdivisions
  72.                 intSliderGrp -field true -l "Subdivisions" -min 1 -max 100 -v 1
  73.                     subdSld;
  74.  
  75.                 // Maximum number of points
  76.                 if ($type != "polySplit")
  77.                 {
  78.                     intSliderGrp -field true 
  79.                         -l "Limit Points to" 
  80.                         -min -1 -max 100 -v -1
  81.                         maxPointsSlider;
  82.                 }
  83.  
  84.                 if ($type == "polyAppend") {
  85.                     // Angle
  86.                     floatSliderGrp -field true -l "Rotation Angle"
  87.                         -min 0.0 -max 360.0 -v 0.0 angSld;
  88.                 }
  89.  
  90.                 if ($type != "polySplit") {
  91.                     optionMenuGrp -label "Texture" textureBox;
  92.                     menuItem -label "None";
  93.                     menuItem -label "Normalize";
  94.                     menuItem -label "Unitize";
  95.                     setParent -menu ..;
  96.                 }
  97.  
  98.                 // Constraints
  99.                 //
  100.                 if ($type == "polySplit") {
  101.                     checkBoxGrp -label "" -label1 "Snap To Edge" snapEdgeBox;
  102.  
  103.                     // Magnet Snapping
  104.                     checkBoxGrp -label "" -label1 "Snap To Magnets" snapMagnetBox;
  105.                     intSliderGrp  -field true -l "Number Of Magnets"
  106.                         -min 0 -max 10 magnetSld;
  107.                     floatSliderGrp  -field true -l "Magnet Tolerance"
  108.                         -min 0. -max 100 snapSld;
  109.                 } else {
  110.                     // Planar constraint
  111.                     checkBoxGrp -label "" -label1 "Ensure Planarity" planarBox;
  112.                 }
  113.  
  114.                 // Operation
  115.                 //
  116.                 if ($type != "polySplit") {
  117.                     radioButtonGrp -l "Operation" -numberOfRadioButtons 2
  118.                         -label1 "Create"
  119.                         -label2 "Append"
  120.                         newFacetRadio;
  121.                 }
  122.  
  123.             setParent ..;    // columnLayout propLayout
  124.         setParent ..;    // frameLayout propFrame    
  125.     setParent ..;    // columnLayout
  126.  
  127.     setUITemplate -popTemplate;
  128. }
  129.